x86/MTRR: consolidation
authorJan Beulich <jbeulich@suse.com>
Tue, 11 Mar 2014 12:53:38 +0000 (13:53 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 11 Mar 2014 12:53:38 +0000 (13:53 +0100)
commit999f631759383d121e0a96bf915505aa8d77aadd
treecd55cebc0d84430556f480f5ba52aee113381913
parentb630217a570d13804642d25992762f59ab6ef7a1
x86/MTRR: consolidation

- use a single set of manifest constants (the ones from msr-index.h)
- drop unnecessary MSR index constants
- get hvm_msr_{read,write}_intercept() in line with the rest of the
  MTRR emulation code regarding the number of emulated MTRRs
- remove use of hardcoded numbers where expressions can be used (at
  once serving as documentation)
- centrally check mtrr_state.have_fixed in get_fixed_ranges(), making
  unnecessary the cpu_has_mtrr check in mtrr_save_fixed_ranges

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/cpu/mtrr/generic.c
xen/arch/x86/cpu/mtrr/main.c
xen/arch/x86/cpu/mtrr/mtrr.h
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/mtrr.c
xen/include/asm-x86/msr-index.h
xen/include/asm-x86/mtrr.h